package com.love.cloud.admin.notify.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.love.cloud.admin.notify.entity.NotifyArticle;
import com.love.cloud.admin.notify.vo.ArticleVo;

/**
 * @author hongdongqu
 */
public interface NotifyArticleService extends IService<NotifyArticle> {

    /**
     * 查询全部文章分页
     * @param articleVo
     * @return
     */
    Object allArticlePage(ArticleVo articleVo);
    /**
     * 文章分页（只查当前用户）
     * @param articleVo
     * @return
     */
    Object articlePage(ArticleVo articleVo);

    /**
     * 查看文章详情
     * @param articleId
     * @return
     */
    NotifyArticle viewArticle(Long articleId);

    /**
     * 保存文章
     * @param notifyArticle
     * @return
     */
    int saveArticle(NotifyArticle notifyArticle);

    /**
     * 发布文章
     * @param notifyArticle
     * @return
     */
    int pushArticle(NotifyArticle notifyArticle);

    /**
     * 点赞
     * @param articleId
     * @param userId
     * @return
     */
    Long praiseArticle(Long articleId, Long userId);
    /**
     * 取消点赞
     *
     */
    Long cancelPraiseArticle(Long articleId, Long userId);
}
